package cur.nature.starter;

import cur.nature.framework.core.log.LOG;
import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.util.StopWatch;

@SpringBootApplication
@OpenAPIDefinition
@ServletComponentScan({"cur.nature","cur.quant","cur.ecmall"})
@ComponentScan({"cur.nature","cur.quant","cur.ecmall"})
// http://localhost:8081/doc.html
public class SystemStarter {

	public static void main(String[] args) {
//		SpringApplication app = new SpringApplication(QuantApplication.class);
//		app.setLazyInitialization(true);
//		app.run(args);
//		SpringApplication.run(QuantStarter.class, args);

		StopWatch stopWatch = new StopWatch();
		stopWatch.start("系统启动时间统计");
		SpringApplication.run(SystemStarter.class, args);
		stopWatch.stop();
		LOG.info(stopWatch.prettyPrint());
		LOG.info("系统启动耗时：" + stopWatch.getTotalTimeSeconds() + " 秒");
	}

}
